package k.order.controller;

import com.yc.bean.Result;
import k.daimai.entity.DmUser;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("feign")
public class feignTest {
    @RequestMapping("add")
    int add(@RequestParam("a") int a,@RequestParam("b") int b) {
        return a + b;
    }
    @RequestMapping("getResult")
    Result getResult( Result result) {
        result.setCode(result.getCode()+1);
        return result;
    }
    @RequestMapping("user")
    DmUser getDmUser(DmUser user,@RequestParam("myname") String myname) {
        user.setCname(myname);
        return user;
    }
    @RequestMapping("hello")
    String hello(@RequestParam("name") String name) {
        return "hello"+name;
    }
}

